#pragma once
#include "Uncopyable.h"

class CWindow;

class CWinApp : private Uncopyable
{
protected:
	tstring m_strCmdLine;
	int m_nCmdShow;
	CWindow* m_pMainWnd;
	HINSTANCE m_hInstance;

protected:
	CWinApp();
	~CWinApp();

public:
	HINSTANCE GetInstanceHandle();

	int Run(HINSTANCE hInstance, LPTSTR lpCmdLine, int nCmdShow);
	
protected:
	void SetArguments(HINSTANCE hInstance, LPTSTR lpCmdLine, int nCmdShow);
	
	int DoAppLoop();
	bool OnIdle(ULONG ulCount);

	virtual bool OnInitApp();
	virtual void OnTerminateApp();
};

